Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document domain points determinism in DKG instances #182

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

piotr-roslaniec
Copy link

@piotr-roslaniec piotr-roslaniec commented Feb 14, 2024

Type of PR:

  • Other

Required reviews:

  • 1

What this does:

  • Documents deterministic behavior of domain points.
    • Determinism is based on the generator derived from rounding selected domain size. As long as the domain size remains the same, so does the generator. Hence, for certain sizes of the domain, the domain points generated are deterministic
    • The domain size is based on the validators_num parameter of the DKG. validators_num is rounded up to the nearest power of two. So as long as our validators_num is rounded to the same domain size size as validators_num of a different DKG instance, our domain points are the same.
    • See tests for examples of that behavior

Issues fixed/closed:

  • Fixes #...

Why it's needed:

Explain how this PR fits in the greater context of the NuCypher Network.
E.g., if this PR address a nucypher/productdev issue, let reviewers know!

Notes for reviewers:

@codecov-commenter
Copy link

codecov-commenter commented Feb 14, 2024

Codecov Report

Attention: 121 lines in your changes are missing coverage. Please review.

Comparison is base (72b8484) 78.28% compared to head (2161c1c) 79.96%.
Report is 1 commits behind head on main.

Files Patch % Lines
ferveo/src/bindings_python.rs 63.15% 49 Missing ⚠️
ferveo/src/api.rs 92.81% 47 Missing ⚠️
ferveo-tdec/src/decryption.rs 26.31% 14 Missing ⚠️
ferveo/src/bindings_wasm.rs 0.00% 5 Missing ⚠️
ferveo/src/refresh.rs 98.67% 3 Missing ⚠️
ferveo/src/dkg.rs 98.62% 2 Missing ⚠️
ferveo-common/src/keypair.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
+ Coverage   78.28%   79.96%   +1.67%     
==========================================
  Files          24       24              
  Lines        5066     5914     +848     
==========================================
+ Hits         3966     4729     +763     
- Misses       1100     1185      +85     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@piotr-roslaniec piotr-roslaniec marked this pull request as ready for review February 14, 2024 15:12
@piotr-roslaniec piotr-roslaniec changed the title Domain points Document domain points determinism in DKG instances Feb 14, 2024
@piotr-roslaniec piotr-roslaniec changed the base branch from main to rocknroll March 19, 2024 09:44
@piotr-roslaniec piotr-roslaniec force-pushed the domain_points branch 2 times, most recently from 5705ec1 to aed5673 Compare March 19, 2024 09:49
@cygnusv
Copy link
Member

cygnusv commented Mar 19, 2024

This test demonstrates that we'll have to deal with an existing restriction on domain set selection that implies that node replacement has to be implemented using domain point reuse, or in other words, not by assigning new domain points. See the plan laid out in #160 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants